package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Letter;
import cn.wolfcode.trip.base.domain.TravelComment;
import cn.wolfcode.trip.base.query.CommentqueryObject;
import cn.wolfcode.trip.base.query.LikeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TravelCommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TravelComment record);

    TravelComment selectByPrimaryKey(Long id);

    List<TravelComment> selectAll();

    int updateByPrimaryKey(TravelComment record);

    List<TravelComment> selectCommentsByTravelId(Long travelId);


    List<Map> usecomment(CommentqueryObject qo);
    List<Map> othercomment(CommentqueryObject qo);

    Integer countUnReadcomment(CommentqueryObject qo);

    void updateState(Long authorId);

    Object maxComment(LikeQueryObject qo);

    Integer countOthersComment(LikeQueryObject qo);

    Integer countComment(LikeQueryObject qo);

    Integer selectReplyCount(Long travelCommentId);

    void updateReplyCount(@Param("replyCount") int replyCount, @Param("travelCommentId") Long travelCommentId);
}